/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
*/

/* Fixed Data in ROM - Field and Curve parameters */

public class ROM
{
/* Don't Modify from here... */

	public static final int CHUNK=32; /* Set word size */
	public static final int NOT_SPECIAL=0;
	public static final int PSEUDO_MERSENNE=1;
	public static final int MONTGOMERY_FRIENDLY=2;
	public static final int GENERALISED_MERSENNE=3;
	public static final int WEIERSTRASS=0;
	public static final int EDWARDS=1;
	public static final int MONTGOMERY=2;
	public static final int BN_CURVE=0;
	public static final int BLS_CURVE=1;

/* ...to here */

/*** Enter Some Field details here  ***/
// BN254 Curve
//	public static final int MODBITS=254; /* Number of bits in Modulus */
//	public static final int MOD8=3;  /* Modulus mod 8 */
//	public static final int BASEBITS=29; /* Almost always 29, 28 for NIST521 */
//	public static final int AES_S=0;  /* AES equivalaent strength if significantly less than group size */

// BLS383 Curve
	public static final int MODBITS=383; /* Number of bits in Modulus */
	public static final int MOD8=3;  /* Modulus mod 8 */
	public static final int BASEBITS=28; /* Almost always 29 or 28  */
	public static final int AES_S=0;

// BLS455 Curve
//	public static final int MODBITS=455; /* Number of bits in Modulus */
//	public static final int MOD8=3;  /* Modulus mod 8 */
//	public static final int BASEBITS=29; /* Almost always 29, 28 for NIST521 */
//	public static final int AES_S=128;

// BN454 Curve
//	public static final int MODBITS=454; /* Number of bits in Modulus */
//	public static final int MOD8=3;  /* Modulus mod 8 */
//	public static final int BASEBITS=29; /* Almost always 29, 28 for NIST521 */
//	public static final int AES_S=128;

// HIFIVE Curve
//	public static final int MODBITS=336;
//	public static final int MOD8=5;
//	public static final int BASEBITS=29;
//	public static final int AES_S=128; 

// GOLDILOCKS
//	public static final int MODBITS=448;
//	public static final int MOD8=7;
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

// NIST384
//	public static final int MODBITS=384;
//	public static final int MOD8=7;
//	public static final int BASEBITS=29;	
//	public static final int AES_S=0; 

// C41417
//	public static final int MODBITS=414;
//	public static final int MOD8=7;
//	public static final int BASEBITS=29;	
//	public static final int AES_S=0; 

// NIST521
//	public static final int MODBITS=521;
//	public static final int MOD8=7;
//	public static final int BASEBITS=28;	
//	public static final int AES_S=0; 

// BN646 Curve
//	public static final int MODBITS=646;
//	public static final int MOD8=3;
//	public static final int BASEBITS=29;	
//	public static final int AES_S=192; 

// Curve 25519
//	public static final int MODBITS=255; 
//	public static final int MOD8=5;  
//	public static final int BASEBITS=29;	
//	public static final int AES_S=0; 

// NIST256 or Brainpool
//	public static final int MODBITS=256; 
//	public static final int MOD8=7;  
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

// MF254 
//	public static final int MODBITS=254; 
//	public static final int MOD8=7;  
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

// MS255
//	public static final int MODBITS= 255;
//	public static final int MOD8= 3;
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

// MF256
//	public static final int MODBITS=256; 
//	public static final int MOD8=7;
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

// MS256
//	public static final int MODBITS= 256;
//	public static final int MOD8= 3;
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

// ANSSI
// public static final int MODBITS= 256;
// public static final int MOD8= 3;
//	public static final int BASEBITS=29;
//	public static final int AES_S=0; 

	public static final int FFLEN=4; /* 2^n multiplier of BIGBITS to specify supported Finite Field size, e.g 2048=256*2^3 where BIGBITS=256 */


/* Don't Modify from here... */

	public static final int NLEN=(1+((MODBITS-1)/BASEBITS));
	public static final int DNLEN=2*NLEN;
	public static final int BMASK=(((int)1<<BASEBITS)-1);
	public static final int MODBYTES=(1+(MODBITS-1)/8);
	public static final int NEXCESS =((int)1<<(CHUNK-BASEBITS-1));
	public static final int FEXCESS =((int)1<<(BASEBITS*NLEN-MODBITS)); 
	public static final int OMASK=(int)(-1)<<(MODBITS%BASEBITS);
	public static final int TBITS=MODBITS%BASEBITS; // Number of active bits in top word 
	public static final int TMASK=((int)1<<TBITS)-1;
	public static final int BIGBITS=(MODBYTES*8);

/* Finite field support - for RSA, DH etc. */
	public static final int FF_BITS=(BIGBITS*FFLEN); /* Finite Field Size in bits - must be 256.2^n */
	public static final int HFLEN=(FFLEN/2);  /* Useful for half-size RSA private key operations */

	public static final int P_MBITS=MODBYTES*8;
	public static final int P_OMASK=((int)(-1)<<(P_MBITS%BASEBITS));
	public static final int P_FEXCESS=((int)1<<(BASEBITS*NLEN-P_MBITS));
	public static final int P_TBITS=(P_MBITS%BASEBITS);

/* ...to here */

// START SPECIFY FIELD DETAILS HERE
//*********************************************************************************
// Curve25519 Modulus 
// 	public static final int MODTYPE=PSEUDO_MERSENNE;
//	public static final int[] Modulus={0x1FFFFFED,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF};
//	public static final int MConst=19;

// NIST-256 Modulus 
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus={0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FF,0x0,0x0,0x40000,0x1FE00000,0xFFFFFF};
//	public static final int MConst=1;

// MF254 Modulus
//	public static final int MODTYPE=MONTGOMERY_FRIENDLY;
//	public static final int[] Modulus={0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3F80FF};
//	public static final int MConst=0x3F8100;

// MS255 Modulus
//public static final int MODTYPE= 1;
//public static final int[] Modulus= {0x1FFFFD03,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF};
//public static final int MConst=0x2FD;

// MS256 Modulus
//public static final int MODTYPE= 1;
//public static final int[] Modulus= {0x1FFFFF43,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFFFFF};
//public static final int MConst=0xBD;

// MF256 Modulus
//public static final int MODTYPE= 2;
//public static final int[] Modulus= {0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFA7FF};
//public static final int MConst=0xFFA800;

// Brainpool Modulus
//	public static final int MODTYPE= 0;
//	public static final int[] Modulus= {0x1F6E5377,0x9A40E8,0x9880A08,0x17EC47AA,0x18D726E3,0x5484EC1,0x6F0F998,0x1B743DD5,0xA9FB57};
//	public static final int MConst=0xEFD89B9;

// ANSSI Modulus
//  public static final int MODTYPE= 0;
//  public static final int[] Modulus= {0x186E9C03,0x7E79A9E,0x12329B7A,0x35B7957,0x435B396,0x16F46721,0x163C4049,0x1181675A,0xF1FD17};
//  public static final int MConst=0x164E1155;


// BNCX Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus= {0x1C1B55B3,0x13311F7A,0x24FB86F,0x1FADDC30,0x166D3243,0xFB23D31,0x836C2F7,0x10E05,0x240000};
//	public static final int MConst=0x19789E85;

// HIFIVE Curve Modulus
//	public static final int MODTYPE=PSEUDO_MERSENNE;
//	public static final int[] Modulus={0x1FFFFFFD,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFF};
//	public static final int MConst=0x3;

// GOLDILOCKS Curve Modulus
//	public static final int MODTYPE=GENERALISED_MERSENNE;
//	public static final int[] Modulus={0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FDFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFF};
//	public static final int MConst=0x1;

// NIST384 Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus={0x1FFFFFFF,0x7,0x0,0x1FFFFE00,0x1FFFEFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7F};
//	public static final int MConst=0x1;

// C41417 Curve Modulus
//	public static final int MODTYPE=PSEUDO_MERSENNE;
//	public static final int[] Modulus={0x1FFFFFEF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFF};
//	public static final int MConst=0x11;

// NIST521 Curve Modulus
//	public static final int MODTYPE=PSEUDO_MERSENNE;
//	public static final int[] Modulus={0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0x1FFFF};
//	public static final int MConst=0x1;


// BN646 Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus={0x404E013,0x1203604,0x4E0000,0x80A2084,0x2,0xC90420,0x4051078,0x3600001,0xA20660,0x36,0x5100900,0x10288468,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90};
//	public static final int MConst=0x15F615E5;

// BN254 Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus= {0x13,0x18000000,0x4E9,0x2000000,0x8612,0x6C00000,0x6E8D1,0x10480000,0x252364};
//	public static final int MConst=0x179435E5;

// BN454 Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus= {0x13,0x270,0x2100,0x1C00D89C,0x25084,0xA284,0x24720,0x10803AA1,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000};
//	public static final int MConst=0x179435E5;

// BLS383 Curve Modulus
	public static final int MODTYPE=NOT_SPECIAL;
	public static final int[] Modulus= {0xAAD556B,0xACAAB52,0x5F75D7A,0x1BB0147,0xD5D7520,0xCF73083,0xF99EB16,0x531820,0xA68EA32,0x2C01355,0x552A785,0x5C6105C,0x80A9F7,0x7AC52};
	public static final int MConst=0x123D0BD;

// BLS455 Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus= {0x2AB,0x1500000C,0xAAA55AA,0xB12AAD6,0x6D1BA6C,0xCCA5674,0x12E2CF6E,0xA9F9662,0x34BD939,0x12D8EAB1,0xFD9978E,0x9240600,0xE0F95B,0xAAB9550,0x55555E5,0xAAAAB};
//	public static final int MConst=0x1F4017FD;


// BNT Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus= {0xEB4A713,0x14EDDFF7,0x1D192EAF,0x14AAAC29,0xD5F06E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120};
//	public static final int MConst=0x1914C4E5;

// BNT2 Curve Modulus
//	public static final int MODTYPE=NOT_SPECIAL;
//	public static final int[] Modulus= {0x1460A48B,0x596E15D,0x1C35947A,0x1F27C851,0x1D00081C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004};
//	public static final int MConst=0x6505CDD;

// START SPECIFY CURVE DETAILS HERE
//*********************************************************************************
// Original Curve25519 
// 	public static final int CURVETYPE=MONTGOMERY;
//	public static final int CURVE_A =486662;
//	public static final int[] CURVE_B = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used
//	public static final int[] CURVE_Order={0x1CF5D3ED,0x9318D2,0x1DE73596,0x1DF3BD45,0x14D,0x0,0x0,0x0,0x100000};
//	public static final int[] CURVE_Gx ={0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gy ={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used


// Ed25519 Curve 
//	public static final int CURVETYPE=EDWARDS;
//	public static final int CURVE_A = -1;
//	public static final int[] CURVE_B = {0x135978A3,0xF5A6E50,0x10762ADD,0x149A82,0x1E898007,0x3CBBBC,0x19CE331D,0x1DC56DFF,0x52036C};
//	public static final int[] CURVE_Order={0x1CF5D3ED,0x9318D2,0x1DE73596,0x1DF3BD45,0x14D,0x0,0x0,0x0,0x100000};
//	public static final int[] CURVE_Gx ={0xF25D51A,0xAB16B04,0x969ECB2,0x198EC12A,0xDC5C692,0x1118FEEB,0xFFB0293,0x1A79ADCA,0x216936};
//	public static final int[] CURVE_Gy={0x6666658,0x13333333,0x19999999,0xCCCCCCC,0x6666666,0x13333333,0x19999999,0xCCCCCCC,0x666666};

// WS25519 Curve
//	public static final int CURVETYPE=WEIERSTRASS;
//	public static final int CURVE_A = -3;
//	public static final int[] CURVE_B = {0x28,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Order = {0x1728ACA1,0x8E7230C,0x10E8DCDB,0x1C1FC966,0x5D5,0x0,0x0,0x0,0x800000}; 
//	public static final int[] CURVE_Gx={0x14D8261F,0x23A9C3B,0x1E392613,0xE9D560D,0x19BD0F9A,0x1A9EF052,0xCFB499,0x4242BE1,0x67E3F5};
//	public static final int[] CURVE_Gy={0x1DEEF38,0x1A31963F,0x4871D5,0x16572E70,0x1DEA014C,0x1AE6A722,0x165D7907,0x1903CD0B,0x36856};

// NIST-256 Curve
//	public static final int CURVETYPE=WEIERSTRASS;
//	public static final int CURVE_A = -3;
//	public static final int[] CURVE_B={0x7D2604B,0x1E71E1F1,0x14EC3D8E,0x1A0D6198,0x86BC651,0x1EAABB4C,0xF9ECFAE,0x1B154752,0x5AC635};
//	public static final int[] CURVE_Order={0x1C632551,0x1DCE5617,0x5E7A13C,0xDF55B4E,0x1FFFFBCE,0x1FFFFFFF,0x3FFFF,0x1FE00000,0xFFFFFF}; 
//	public static final int[] CURVE_Gx={0x1898C296,0x509CA2E,0x1ACCE83D,0x6FB025B,0x40F2770,0x1372B1D2,0x91FE2F3,0x1E5C2588,0x6B17D1};
//	public static final int[] CURVE_Gy={0x17BF51F5,0x1DB20341,0xC57B3B2,0x1C66AED6,0x19E162BC,0x15A53E07,0x1E6E3B9F,0x1C5FC34F,0x4FE342};
//
// MF254 Modulus, Weierstrass Curve w-254-mont
//public static final int CURVETYPE= 0;
//public static final int CURVE_A = -3;
//public static final int[] CURVE_B = {0x1FFFD08D,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3F80FF};
//public static final int[] CURVE_Order={0xF8DF83F,0x1D20CE25,0x8DD701B,0x317D41B,0x1FFFFEB8,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3F80FF};
//public static final int[] CURVE_Gx ={0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0x190D4EBC,0xB2EF9BF,0x14464C6B,0xE71C7F0,0x18AEBDFB,0xD3ADEBB,0x18052B85,0x1A6765CA,0x140E3F};

// MF254 Modulus, Edwards Curve ed-254-mont
//public static final int CURVETYPE= 1;
//public static final int CURVE_A = -1;
//public static final int[] CURVE_B = {0x367B,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Order={0x46E98C7,0x179E9FF6,0x158BEC3A,0xA60D917,0x1FFFFEB9,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFE03F};
//public static final int[] CURVE_Gx ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0xF2701E5,0x29687ED,0xC84861F,0x535081C,0x3F4E363,0x6A811B,0xCD65474,0x121AD498,0x19F0E6};

// MF254 Modulus, Montgomery Curve
// 	public static final int CURVETYPE=MONTGOMERY;
//	public static final int CURVE_A =-55790;
//	public static final int[] CURVE_B = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used
//	public static final int[] CURVE_Order={0x46E98C7,0x179E9FF6,0x158BEC3A,0xA60D917,0x1FFFFEB9,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFE03F};
//	public static final int[] CURVE_Gx ={0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gy ={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used

// MS255 Modulus, Weierstrass Curve
//public static final int CURVETYPE= WEIERSTRASS;
//public static final int CURVE_A = -3;
//public static final int[] CURVE_B = {0x1FFFAB46,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF};
//public static final int[] CURVE_Order={0x1C594AEB,0x1C7D64C1,0x14ACF7EA,0x14705075,0x1FFFF864,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FFFFF};
//public static final int[] CURVE_Gx ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0x9CB44BA,0x199FFB3B,0x1F698345,0xD8F19BB,0x17D177DB,0x1FFCD97F,0xCE487A,0x181DB74F,0x6F7A6A};

// MS255 Modulus, Edwards Curve
//public static final int CURVETYPE= EDWARDS;
//public static final int CURVE_A = -1;
//public static final int[] CURVE_B = {0xEA97,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Order={0x436EB75,0x24E8F68,0x9A0CBAB,0x34F0BDB,0x1FFFFDCF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFF};
//public static final int[] CURVE_Gx ={0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0x108736A0,0x11512ADE,0x1116916E,0x29715DA,0x47E5529,0x66EC706,0x1517B095,0xA694F76,0x26CB78};

// MS255 Modulus, Montgomery Curve
// 	public static final int CURVETYPE=MONTGOMERY;
//	public static final int CURVE_A =-240222;
//	public static final int[] CURVE_B = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used
//	public static final int[] CURVE_Order={0x436EB75,0x24E8F68,0x9A0CBAB,0x34F0BDB,0x1FFFFDCF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFF};
//	public static final int[] CURVE_Gx ={0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gy ={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used

// MS256, Weierstrass Curve
//public static final int CURVETYPE= WEIERSTRASS;
//public static final int CURVE_A = -3;
//public static final int[] CURVE_B = {0x25581,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Order={0x751A825,0x559014A,0x9971808,0x1904EBD4,0x1FFFFE43,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFFFFF};
//public static final int[] CURVE_Gx ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0x2B56C77,0x1FA31836,0x253B042,0x185F26EB,0xDD6BD02,0x4B66777,0x1B5FF20B,0xA783C8C,0x696F18};

// MS256, Edwards Curve
//public static final int CURVETYPE= EDWARDS;
//public static final int CURVE_A = -1;
//public static final int[] CURVE_B = {0x3BEE,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Order={0x1122B4AD,0xDC27378,0x9AF1939,0x154AB5A1,0x1FFFFBE6,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FFFFF};
//public static final int[] CURVE_Gx ={0xD,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0x131CADBA,0x3FB7DA9,0x134C0FDC,0x14DAC704,0x46BFBE2,0x1859CFD0,0x1B6E8F4C,0x3C5424E,0x7D0AB4};

// MS256 Modulus, Montgomery Curve
// 	public static final int CURVETYPE=MONTGOMERY;
//	public static final int CURVE_A =-61370;
//	public static final int[] CURVE_B = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used
//  public static final int[] CURVE_Order={0x1122B4AD,0xDC27378,0x9AF1939,0x154AB5A1,0x1FFFFBE6,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FFFFF};
//	public static final int[] CURVE_Gx ={0xb,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gy ={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used

// MF256 Modulus, Weierstrass Curve
//public static final int CURVETYPE= WEIERSTRASS;
//public static final int CURVE_A = -3;
//public static final int[] CURVE_B = {0x14E6A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Order={0x79857EB,0x8862F0D,0x1941D2E7,0x2EA27CD,0x1FFFFFC5,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0xFFA7FF};
//public static final int[] CURVE_Gx ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0xB724D2A,0x3CAA61,0x5371984,0x128FD71B,0x1AE28956,0x1D13091E,0x339EEAE,0x10F7C301,0x20887C};

// MF256, Edwards Curve
//public static final int CURVETYPE= EDWARDS;
//public static final int CURVE_A = -1;
//public static final int[] CURVE_B = {0x350A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Order={0x18EC7BAB,0x16C976F6,0x19CCF259,0x9775F70,0x1FFFFB15,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FE9FF};
//public static final int[] CURVE_Gx ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//public static final int[] CURVE_Gy ={0x12F3C908,0xF553917,0x1FA9A35F,0xBCC91B,0x1AACA0C,0x1779ED96,0x156BABAF,0x1F1F1989,0xDAD8D4};

// MF256 Modulus, Montgomery Curve
// 	public static final int CURVETYPE=MONTGOMERY;
//	public static final int CURVE_A =-54314;
//	public static final int[] CURVE_B = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used
//  public static final int[] CURVE_Order={0x18EC7BAB,0x16C976F6,0x19CCF259,0x9775F70,0x1FFFFB15,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x3FE9FF};
//	public static final int[] CURVE_Gx ={0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gy ={0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}; // not used

// Brainpool
//	public static final int CURVETYPE= WEIERSTRASS;
//	public static final int CURVE_A = -3;
//	public static final int[] CURVE_B = {0x1EE92B04,0x172C080F,0xBD2495A,0x7D7895E,0x176B7BF9,0x13B99E85,0x1A93F99A,0x18861B09,0x662C61};
//	public static final int[] CURVE_Order={0x174856A7,0xF07414,0x1869BDE4,0x12F5476A,0x18D718C3,0x5484EC1,0x6F0F998,0x1B743DD5,0xA9FB57};
//	public static final int[] CURVE_Gx ={0xE1305F4,0xD0C8AB1,0xBEF0ADE,0x28588F5,0x16149AFA,0x9D91D32,0x1EDDCC88,0x79839FC,0xA3E8EB};
//	public static final int[] CURVE_Gy ={0x1B25C9BE,0xD5F479A,0x1409C007,0x196DBC73,0x417E69B,0x1170A322,0x15B5FDEC,0x10468738,0x2D996C};

// ANSSI
//  public static final int CURVETYPE= WEIERSTRASS;
//  public static final int CURVE_A = -3;
//  public static final int[] CURVE_B = {0x1B7BB73F,0x3AF6CB3,0xC68600C,0x181935C9,0xC00FDFE,0x1D3AA522,0x4C0352A,0x194A8515,0xEE353F};
//  public static final int[] CURVE_Order={0x6D655E1,0x1FEEA2CE,0x14AFE507,0x18CFC281,0x435B53D,0x16F46721,0x163C4049,0x1181675A,0xF1FD17};
//  public static final int[] CURVE_Gx ={0x198F5CFF,0x64BD16E,0x62DC059,0xFA5B95F,0x23958C2,0x1EA3A4EA,0x7ACC460,0x186AD827,0xB6B3D4};
//  public static final int[] CURVE_Gy ={0x14062CFB,0x188AD0AA,0x19327860,0x3860FD1,0xEF8C270,0x18F879F6,0x12447E49,0x1EF91640,0x6142E0};

// HIFIVE 
//	public static final int CURVETYPE=EDWARDS;
//	public static final int CURVE_A=1;
//	public static final int[] CURVE_Order={0x1E9FA805,0x197CACB9,0x1E4EEA9E,0x17AD70F,0x1FA9850C,0x38A0A,0x0,0x0,0x0,0x0,0x0,0x4000};
//	public static final int[] CURVE_B = {0x2B67,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gx ={0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gy ={0x5FE8632,0x15F63428,0xD976C4,0x1AACA194,0x35B6DB5,0x8E3F7A,0x52D1B0E,0xF0A7A36,0x1C161D00,0x8170C70,0x1185AD59,0x181B};

// GOLDILOCKS
//	public static final int CURVETYPE=EDWARDS;
//	public static final int CURVE_A=1;
//	public static final int[] CURVE_Order={0xB5844F3,0x1BC61495,0x1163D548,0x1984E51B,0x3690216,0xDA4D76B,0xFA7113B,0x1FEF9944,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7FF};
//	public static final int[] CURVE_B = {0x1FFF6756,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FDFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFF};
//	public static final int[] CURVE_Gx ={0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0x152AAAAA,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x15555555,0xAAAAAAA,0x1555};
//	public static final int[] CURVE_Gy ={0xA9386ED,0x1757DE6F,0x13681AF6,0x19657DA3,0x3098BBB,0x12C19D15,0x12E03595,0xE515B18,0x17B7E36D,0x1AC426E,0xDBB5E8,0x10D8560,0x159D6205,0xB8246D9,0x17A58D2B,0x15C0};

// NIST384
//	public static final int CURVETYPE=WEIERSTRASS;
//	public static final int CURVE_A=-3;
//	public static final int[] CURVE_Order = {0xCC52973,0x760CB56,0xC29DEBB,0x141B6491,0x12DDF581,0x6C0FA1B,0x1FFF1D8D,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x7F};
//	public static final int[] CURVE_B = {0x13EC2AEF,0x142E476E,0xBB4674A,0xC731B14,0x1875AC65,0x447A809,0x4480C50,0xDDFD028,0x19181D9C,0x1F1FC168,0x623815A,0x47DCFC9,0x1312FA7E,0x59};
//	public static final int[] CURVE_Gx = {0x12760AB7,0x12A2F1C3,0x154A5B0E,0x5E4BB7E,0x2A38550,0xF0412A,0xE6167DD,0xC5174F3,0x146E1D3B,0x1799056B,0x3AC71C7,0x1D160A6F,0x87CA22B,0x55};
//	public static final int[] CURVE_Gy = {0x10EA0E5F,0x1218EBE4,0x1FA0675E,0x1639C3A,0xB8C00A6,0x1889DAF8,0x11F3A768,0x17A51342,0x9F8F41D,0x1C9496E1,0x1767A62F,0xC4C58DE,0x17DE4A9,0x1B};

// C41417
//	public static final int CURVETYPE=EDWARDS;
//	public static final int CURVE_A=1;
//	public static final int[] CURVE_Order = {0x106AF79,0x18738D2F,0x18F3C606,0x1806715A,0x22B36F1,0xA67B830,0xCF32490,0x1FFFFFFD,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1FFFFFFF,0x1F};
//	public static final int[] CURVE_B = {0xE21,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
//	public static final int[] CURVE_Gx = {0x13CBC595,0x7E9C097,0x14DF1931,0x14E7F550,0x1A111301,0x15A6B6B5,0xD526292,0x18FEAFFE,0x1F44C03E,0x1E6A31B4,0x70C9B97,0x43180C6,0x1443300,0x19A4828A,0x68};
//	public static final int[] CURVE_Gy = {0x22,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

// NIST521
//	public static final int CURVETYPE=WEIERSTRASS;
//	public static final int CURVE_A=-3;
//	public static final int[] CURVE_Order = {0x1386409,0x6FB71E9,0xC47AEBB,0xC9B8899,0x5D03BB5,0x48F709A,0xB7FCC01,0xBF2F966,0x1868783,0xFFFFFA5,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0xFFFFFFF,0x1FFFF};
//	public static final int[] CURVE_B = {0xB503F00,0x451FD46,0xC34F1EF,0xDF883D2,0xF073573,0xBD3BB1B,0xB1652C0,0xEC7E937,0x6193951,0xF109E15,0x489918E,0x15F3B8B,0x25B99B3,0xEEA2DA7,0xB68540,0x929A21A,0xE1C9A1F,0x3EB9618,0x5195};
//	public static final int[] CURVE_Gx = {0x2E5BD66,0x7E7E31C,0xA429BF9,0xB3C1856,0x8DE3348,0x27A2FFA,0x8FE1DC1,0xEFE7592,0x14B5E77,0x4D3DBAA,0x8AF606B,0xB521F82,0x139053F,0x429C648,0x62395B4,0x9E3ECB6,0x404E9CD,0x8E06B70,0xC685};
//	public static final int[] CURVE_Gy = {0xFD16650,0xBE94769,0x2C24088,0x7086A27,0x761353C,0x13FAD0,0xC550B9,0x5EF4264,0x7EE7299,0x3E662C9,0xFBD1727,0x446817A,0x449579B,0xD998F54,0x42C7D1B,0x5C8A5FB,0xA3BC004,0x296A789,0x11839};

//BN646 Curve
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BN_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_Order={0x1E04200D,0x1203603,0x420000,0x80A207E,0x2,0xC303F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90};
	public static final int[] CURVE_B= {0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof= {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Gx={0x404E012,0x1203604,0x4E0000,0x80A2084,0x2,0xC90420,0x4051078,0x3600001,0xA20660,0x36,0x5100900,0x10288468,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90};
	public static final int[] CURVE_Gy={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Bnx={0x1001,0x0,0x10000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0x401B007,0x901,0x1B0000,0x1B024,0x0,0x288120,0xD812,0x900000,0x1B0120,0x0,0xD80000,0x6C048,0x0,0x6C0000,0x0,0x0,0x120000,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Fra={0x4929A14,0x3B756CA,0x4337DD0,0xFC1417C,0x193166BB,0x1DC54515,0x1C0DF653,0x19BF8961,0x155980E,0x1983CB14,0x4D76309,0x1DEAB1A4,0xF9C3CF5,0x128FEC2D,0x867E339,0xDA0548A,0x1A480AF,0xA3CBCD2,0x116DA6E0,0x2A546E9,0x789577C,0x1F9459D2,0x27};
	public static final int[] CURVE_Frb={0x1F7245FF,0x1D68DF39,0x1C1A822F,0x1848DF07,0x6CE9946,0x303BF0A,0x7F71A24,0x9A0769F,0x1F4C6E51,0x67C3521,0x38A5F6,0x123DD2C4,0x1063C317,0xFF825D2,0x17981E76,0x125FAB75,0x1EC78CD0,0x15C34375,0xE92591F,0x1D5ABD96,0x1876A883,0x6BA62D,0x68};
	public static final int[] CURVE_Pxa={0x1CCC5E10,0x119F939,0xC6C7FE9,0x81022FF,0x6486AA6,0x1CBC560B,0x1F707429,0xC82F7B9,0x1A7F5CDA,0x14C0EB47,0x11412373,0x13DAF21E,0x126BE416,0x166744A7,0x506E81,0x1048FFA3,0x13A6B0C9,0x1A90979A,0xE78C338,0x1722C561,0xBFFF9A1,0xC1AF83C,0x3F};
	public static final int[] CURVE_Pxb={0x67F4BC0,0x1BFC3C9,0x1E9DC3B6,0x87E2B03,0xB820274,0x1DD03B1E,0x517C463,0x1EFCBBC9,0x19F786A8,0x5572E90,0xD0BA5E0,0x16E8A40A,0x1013CF3B,0x11A7F82B,0x1C27B302,0x15E7CD12,0xB79A6DF,0x1EC6895B,0x5775A7E,0xBB28D24,0x416A171,0x127D284E,0x5D};
	public static final int[] CURVE_Pya={0xC3FB414,0x2B868EE,0xD858793,0x157FCFE,0x16C849AD,0x1D17B0A4,0x1353CFEA,0x940A061,0x1CEF834E,0x7BE766A,0x4584C1C,0xE2397E9,0x418E9D4,0x8F53B8,0x53B37E0,0x11CA29D9,0xE425654,0x9EFF9AF,0x18CF27A1,0x17755A26,0x3F5481A,0x6C531BC,0x1E};
	public static final int[] CURVE_Pyb={0x133908AD,0x17F1F1ED,0x14196532,0x19A85214,0x173EC3F7,0x1021EC2C,0xD798A3E,0x18F4C857,0x82EE2FA,0x11B5296D,0x1831D9C6,0x4463DB5,0x11B4812C,0xF93B884,0xC72653,0xEC6F6ED,0x916CFFF,0x1E81ED0A,0x1103518E,0x1E478B01,0x6B01074,0xC46CCAA,0x48};
	public static final int[][] CURVE_W={{0x6008003,0x0,0x80000,0x6,0x0,0x40030,0x3,0x0,0x30,0x0,0x0,0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_SB={{{0x600A004,0x0,0xA0000,0x6,0x0,0x50030,0x3,0x0,0x30,0x0,0x0,0xC,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1803A00A,0x1203603,0x3A0000,0x80A2078,0x2,0xBF03C0,0x4051072,0x3600001,0xA20600,0x36,0x5100900,0x10288450,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90}}};
	public static final int[][] CURVE_WB={{0x2001000,0x0,0x10000,0x2,0x0,0x8010,0x1,0x0,0x10,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1C015005,0x600,0x150000,0x1201C,0x0,0x1C80E0,0x900E,0x600000,0x1200E0,0x0,0x900000,0x48038,0x0,0x480000,0x0,0x0,0xC0000,0x0,0x0,0x0,0x0,0x0,0x0},{0xE00B003,0x300,0xB0000,0x900E,0x0,0xE8070,0x4807,0x300000,0x90070,0x0,0x480000,0x2401C,0x0,0x240000,0x0,0x0,0x60000,0x0,0x0,0x0,0x0,0x0,0x0},{0x2003001,0x0,0x30000,0x2,0x0,0x18010,0x1,0x0,0x10,0x0,0x0,0x4,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_BB={{{0x1E04100D,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90},{0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90},{0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90},{0x2002,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90},{0x1E04100D,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90},{0x1E04100C,0x1203603,0x410000,0x80A207E,0x2,0xC283F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90}},{{0x2002,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x2001,0x0,0x20000,0x0,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x1002,0x0,0x10000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x4002,0x0,0x40000,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1E04000A,0x1203603,0x400000,0x80A207E,0x2,0xC203F0,0x4051075,0x3600001,0xA20630,0x36,0x5100900,0x1028845C,0xD,0x2881200,0x1B0,0x0,0x6C0D80,0x48,0x0,0x480,0x0,0x0,0x90},{0x1002,0x0,0x10000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=false;
*/
// BNCX Curve 
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BN_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0x16EB1F6D,0x108E0531,0x1241B3AF,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000};
	public static final int[] CURVE_Bnx={0x3C012B1,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0x14235C97,0xF0498BC,0x1BE1D58C,0x1BBEC8E3,0x3F1440B,0x654,0x12000,0x0,0x0};
	public static final int[] CURVE_Fra={0x15C80EA3,0x1EC8419A,0x1CFE0856,0xEE64DE2,0x11898686,0x5C55653,0x592BF86,0x5F4C740,0x135908};
	public static final int[] CURVE_Frb={0x6534710,0x1468DDE0,0x551B018,0x10C78E4D,0x4E3ABBD,0x9ECE6DE,0x2A40371,0x1A0C46C5,0x10A6F7};
	public static final int[] CURVE_Pxa={0x4D2EC74,0x428E777,0xF89C9B0,0x190B7F40,0x14BBB907,0x12807AE1,0x958D62C,0x58E0A76,0x19682D};
	public static final int[] CURVE_Pxb={0xE29CFE1,0x1D2C7459,0x270C3D1,0x172F6184,0x19743F81,0x49BD474,0x192A8047,0x1D87C33E,0x1466B9};
	public static final int[] CURVE_Pya={0xF0BE09F,0x7DFE75E,0x1FB06CC3,0x3667B08,0xE209636,0x110ABED7,0xE376078,0x1B2E4665,0xA79ED};
	public static final int[] CURVE_Pyb={0x898EE9D,0xC825914,0x14BB7AFB,0xC9D4AD3,0x13461C28,0x122896C6,0x240D71B,0x73D9898,0x6160C};
	public static final int[] CURVE_Gx ={0x1C1B55B2,0x13311F7A,0x24FB86F,0x1FADDC30,0x166D3243,0xFB23D31,0x836C2F7,0x10E05,0x240000};
	public static final int[] CURVE_Gy ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[][] CURVE_W={{0x162FEB83,0x2A31A48,0x100E0480,0x16,0x600,0x0,0x0,0x0,0x0},{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_SB={{{0x1DB010E4,0x2A31A48,0x100E04A0,0x16,0x600,0x0,0x0,0x0,0x0},{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xBB33EA,0xDEAEAE9,0x233AF2F,0x1FADDC03,0x166D2643,0xFB23D31,0x836C2F7,0x10E05,0x240000}}};
	public static final int[][] CURVE_WB={{0x167A84B0,0xE108C2,0x1004AC10,0x7,0x200,0x0,0x0,0x0,0x0},{0x1E220475,0x166FCCAD,0x129FE68D,0x1D29DB51,0x2A0DC07,0x438,0xC000,0x0,0x0},{0xF10B93,0x1B37E657,0x194FF34E,0x1E94EDA8,0x1506E03,0x21C,0x6000,0x0,0x0},{0x1DFAAA11,0xE108C2,0x1004AC30,0x7,0x200,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_BB={{{0x132B0CBD,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000},{0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000},{0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000},{0x7802562,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000},{0x132B0CBD,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000},{0x132B0CBC,0x108E0531,0x1241B39F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000}},{{0x7802562,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x7802561,0x0,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x3C012B2,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0},{0xF004AC2,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0},{0xF6AFA0A,0x108E0531,0x1241B38F,0x1FADDC19,0x166D2C43,0xFB23D31,0x836C2F7,0x10E05,0x240000},{0x3C012B2,0x0,0x10,0x0,0x0,0x0,0x0,0x0,0x0}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=true;
*/
// BNT2 Curve
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BN_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0x11AA2BF5,0x1FDB8D28,0xDCE0CF5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004};
	public static final int[] CURVE_Bnx={0x608205,0x1008,0x10,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0x866BD33,0x1A813A22,0x591C3BE,0xAB6EE60,0x1ECF2367,0x361B0BD,0x12000,0x0,0x0};
	public static final int[] CURVE_Fra={0x13AEF062,0x1593464B,0x10EF3924,0x198D3667,0x17F195BB,0xFB3FD1,0xADAF429,0x11A53D19,0x124E0B};
	public static final int[] CURVE_Frb={0xB1B429,0x10039B12,0xB465B55,0x59A91EA,0x50E7261,0xF0C5DF3,0x1FDBE90F,0x1EA2E4D1,0x11B1F8};
	public static final int[] CURVE_Pxa={0x1F40A3C8,0x166491CC,0x19845E12,0xB9B49D2,0x161706B3,0xBBD82B4,0x18C609E7,0x19F2D278,0x16FC17};
	public static final int[] CURVE_Pxb={0x18549540,0x2ABD456,0x1D944184,0x16DEF7CD,0x1A95D17D,0x42B2C83,0x16427206,0x17AB2E,0x1EB5B5};
	public static final int[] CURVE_Pya={0x14220513,0x3DF6628,0x39CDEC5,0x894F10C,0x135F1268,0x1D28DC1C,0xAAA7537,0x130EC284,0x1E8EE4};
	public static final int[] CURVE_Pyb={0x177CE78E,0x1DC9947A,0x1BE95E07,0x1D6E8DC4,0x1FB8E27,0x1B549EDE,0xF6E8A75,0x19B75C67,0x23CEF4};	
	public static final int[] CURVE_Gx ={0x1460A48A,0x596E15D,0x1C35947A,0x1F27C851,0x1D00081C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004};
	public static final int[] CURVE_Gy ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[][] CURVE_W={{0x1347083,0x5BB1415,0xE678744,0xC0602,0x600,0x0,0x0,0x0,0x0},{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_SB={{{0x1F5748C,0x5BB3425,0xE678764,0xC0602,0x600,0x0,0x0,0x0,0x0},{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x1075BB72,0x1A207913,0x1F6685B1,0x1F0FBC4C,0x1CFFFC1C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004}}};
	public static final int[][] CURVE_WB={{0xA70A224,0xC9396A4,0x1A228251,0x40200,0x200,0x0,0x0,0x0,0x0},{0x1030EF19,0xAD2B967,0xD50DC87,0x72CA2EC,0x148A1B9A,0x241207E,0xC000,0x0,0x0},{0x1848B88F,0x156964B7,0x6A86E4B,0x3965176,0xA450DCD,0x120903F,0x6000,0x0,0x0},{0xB31A62D,0xC93B6B4,0x1A228271,0x40200,0x200,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_BB={{{0x1149A9F1,0x1FDB7D20,0xDCE0CE5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004},{0x1149A9F0,0x1FDB7D20,0xDCE0CE5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004},{0x1149A9F0,0x1FDB7D20,0xDCE0CE5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004},{0xC1040A,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x1149A9F0,0x1FDB7D20,0xDCE0CE5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004},{0x1149A9F1,0x1FDB7D20,0xDCE0CE5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004},{0x1149A9F0,0x1FDB7D20,0xDCE0CE5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004}},{{0xC1040A,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xC10409,0x2010,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x608206,0x1008,0x10,0x0,0x0,0x0,0x0,0x0,0x0},{0x1820812,0x4020,0x40,0x0,0x0,0x0,0x0,0x0,0x0},{0x10E927EA,0x1FDB6D18,0xDCE0CD5,0x1F1BC24F,0x1D00021C,0x10079DC4,0xAB6DD38,0x104821EB,0x240004},{0x608206,0x1008,0x10,0x0,0x0,0x0,0x0,0x0,0x0}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=true;
*/

// BN254 Curve
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BN_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0xD,0x8000000,0x428,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364};
	public static final int[] CURVE_Bnx={0x1,0x4000000,0x10,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0x7,0xC000000,0x1B3,0x12000000,0x2490,0x11200000,0x126CD,0x0,0x0};
	public static final int[] CURVE_Fra={0xF2A6DE9,0xBEF3603,0xFDDF0B8,0x12E9249A,0x953F850,0xDA85423,0x1232D926,0x32425CF,0x1B3776};
	public static final int[] CURVE_Frb={0x10D5922A,0xC10C9FC,0x10221431,0xF16DB65,0x16AC8DC1,0x1917ABDC,0xDD40FAA,0xD23DA30,0x9EBEE};
	public static final int[] CURVE_Pxa={0x803FB2B,0xF721126,0x62FC364,0x9177691,0x1EDB6A46,0x63F4630,0x18BFAE36,0x176A33D6,0x61A10};
	public static final int[] CURVE_Pxb={0x7D54CF3,0xC61A60F,0xDE12DC3,0x1AE8D75C,0xAA5B1F4,0x13C62CC1,0xCCC42A,0x1F374E6F,0x516AA};
	public static final int[] CURVE_Pya={0x11CD2B9A,0xF8703C4,0xF826F46,0x1A15CD7B,0x822329B,0x104B34C6,0xD0E6A43,0x140D75F2,0x21897};
	public static final int[] CURVE_Pyb={0xB3ACE9B,0x1168D763,0xE7255E2,0xDFFAE,0x18D37B09,0x22B7AF9,0x149A3DB5,0x1CF9162,0xEBB2B};
	public static final int[] CURVE_Gx ={0x12,0x18000000,0x4E9,0x2000000,0x8612,0x6C00000,0x6E8D1,0x10480000,0x252364};
	public static final int[] CURVE_Gy ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[][] CURVE_W={{0x3,0x0,0x81,0x3000000,0x618,0x0,0x0,0x0,0x0},{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_SB={{{0x4,0x8000000,0xA1,0x3000000,0x618,0x0,0x0,0x0,0x0},{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xA,0x8000000,0x3A7,0x1C000000,0x79E1,0x6C00000,0x6E8D1,0x10480000,0x252364}}};
	public static final int[][] CURVE_WB={{0x0,0x4000000,0x10,0x1000000,0x208,0x0,0x0,0x0,0x0},{0x5,0x14000000,0x152,0xE000000,0x1C70,0xC00000,0xC489,0x0,0x0},{0x3,0xC000000,0xB1,0x7000000,0xE38,0x10600000,0x6244,0x0,0x0},{0x1,0xC000000,0x30,0x1000000,0x208,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_BB={{{0xD,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364},{0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364},{0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364},{0x2,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364},{0xD,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364},{0xC,0x4000000,0x418,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364}},{{0x2,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x8000000,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x2,0x4000000,0x10,0x0,0x0,0x0,0x0,0x0,0x0},{0x2,0x10000000,0x40,0x0,0x0,0x0,0x0,0x0,0x0},{0xA,0x0,0x408,0x1F000000,0x7FF9,0x6C00000,0x6E8D1,0x10480000,0x252364},{0x2,0x4000000,0x10,0x0,0x0,0x0,0x0,0x0,0x0}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=false;
*/
// BN454 Curve
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BN_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0xD,0x210,0x1F80,0x400D884,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000};
	public static final int[] CURVE_Gx={0x12,0x270,0x2100,0x1C00D89C,0x25084,0xA284,0x24720,0x10803AA1,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000};
	public static final int[] CURVE_Gy={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Bnx={0x1,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0x7,0xD8,0x900,0x16002436,0x481,0x1B24,0x168,0x48006C9,0x1600006C,0x10000091,0xD80000D,0x240000,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Fra={0x1573B0EC,0x1816E4FE,0xA42E6E0,0x15DDCD87,0x2B17EC7,0x35B9A50,0x15AA1F74,0x1B7B2AC5,0x1CB5A200,0x9937657,0x17389A4A,0x738BADB,0xD92B321,0x3F5F0E6,0x1B1C9E9A,0x25CF3};
	public static final int[] CURVE_Frb={0xA8C4F27,0x7E91D71,0x15BD3A1F,0x6230B14,0x1D50D1BD,0x1CA50833,0xA5827AB,0x15050FDB,0x74B3887,0x166C9A92,0x19C78A3C,0x199F4886,0x1B6D4F39,0x80A0F61,0x7236169,0x2230C};
	public static final int[] CURVE_Pxa={0xF02B14,0x1DD1DD61,0x330AEC7,0x178617DE,0x1CEFFF36,0x116D35AF,0x1F879FBF,0x105DBF83,0x8345436,0x13664BCA,0x12EE86B5,0x776BB31,0x14AAFE16,0x41B3478,0x13E03554,0x2807A};
	public static final int[] CURVE_Pxb={0x45BF266,0xE036876,0x8F0DBA,0xCB5976F,0x10DBC523,0x1723123C,0xBDDA7F4,0x10077CDE,0x11971DE0,0x14F1554A,0x195995EE,0x82E6FD7,0x40D5258,0x1400A58F,0x15A7850B,0x2B2A5};
	public static final int[] CURVE_Pya={0x1E1B15C7,0x9CD5B5D,0x1571B2D2,0x1E4C048A,0x1474FB5D,0x18E2328C,0x11775519,0x144EF51F,0xF2FAABA,0x438F741,0x1930EAC0,0x144DC38,0x1287A0FE,0x36D8962,0x10011EAF,0x3ACF4};
	public static final int[] CURVE_Pyb={0x571D60,0x8737DB,0xC4A363B,0x124E308F,0x13A65C7E,0x1387693A,0x10CDDA2F,0x184C096E,0x385175,0x5A34088,0xF17A93C,0x1E194915,0x1903ED91,0x4D6FA9F,0x8D8210B,0x12EDC};
	public static final int[][] CURVE_W={{0x3,0x40,0x180,0x10000010,0xC0,0x6,0x10000018,0xC00001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_SB={{{0x4,0x50,0x180,0x14000014,0xC0,0x6,0x10000018,0xC00001,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0xA,0x1D0,0x1E00,0x1400D874,0x24F03,0xA278,0x246F0,0xF003A9E,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000}}};
	public static final int[][] CURVE_WB={{0x0,0x8,0x80,0x2000002,0x40,0x2,0x10000008,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x5,0xA8,0x700,0xA00182A,0x381,0x121C,0x100,0x3800487,0x4000048,0x61,0x9000009,0x180000,0x0,0x0,0x0,0x0},{0x3,0x58,0x380,0x16000C16,0x1C0,0x90E,0x10000080,0x1C00243,0x12000024,0x10000030,0x4800004,0xC0000,0x0,0x0,0x0,0x0},{0x1,0x18,0x80,0x6000006,0x40,0x2,0x10000008,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_BB={{{0xD,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000},{0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000},{0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000},{0x2,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000},{0xD,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000},{0xC,0x208,0x1F80,0x200D882,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000}},{{0x2,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x1,0x10,0x0,0x4000004,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x2,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x2,0x20,0x0,0x8000008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0xA,0x200,0x1F80,0xD880,0x24FC4,0xA27E,0x10024708,0xFC03A9F,0x400DA88,0x10EA,0x11002487,0xD80362,0x900025B,0xC000048,0x2400003,0x48000},{0x2,0x8,0x0,0x2000002,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=false;
*/

// BLS455 Curve
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BLS_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0xA,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0xABFFAAB,0x14AABFFD,0xD52AADA,0x1562AAAB,0x15556AAA,0x2A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0x1FC00001,0x3FFF,0x10000070,0x1400000,0x1D100,0xF0003A8,0x13C0009,0x1E200,0x180002E0,0x400001,0x4000,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Gx={0x1DFCEDD1,0x16A62EEF,0xE80D3ED,0xB8DE876,0x179C7253,0x182DAB52,0x46CC85F,0x1E571D9C,0x1E8392B1,0x1A155867,0x19E6527C,0x23DC64E,0xABEDA59,0xF20662B,0x17CECC01,0x310A};
	public static final int[] CURVE_Gy={0x6619B9B,0x27EBCD,0x1BE80A19,0x13B014BA,0x191A4936,0x13911916,0x107A5A3B,0x1DCB0863,0x1F5FB1,0xDE44A9C,0x18E23B2A,0x1FA81FD3,0xB0D6DFA,0xC2FE1EF,0xDDFA7E2,0x3351B};

	public static final int[] CURVE_Bnx={0x800,0x1000004,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0xAA9,0x9017FE0,0x128DD8AA,0x1F4A321E,0x148FEC90,0x195CDEEA,0xE961AA2,0x168D3B66,0xAFD99D7,0xB989AA6,0x1F9A5724,0x91A05FF,0xE0EF5B,0xAAB9548,0x55555E5,0xAAAAB};
	public static final int[] CURVE_Fra={0xA2EBF21,0x4E67DEE,0xCDE6590,0xE5EA94E,0x15454985,0x140CFC43,0x7E14D1C,0x1778395A,0x1944F022,0x166BEA1A,0xC3DEEA0,0x9F031A0,0x16A7459,0x1F1D6E00,0x125CFB72,0x72FD4};
	public static final int[] CURVE_Frb={0x15D1438A,0x1019821D,0x1DCBF01A,0x1CB40187,0x118C70E6,0x18BD5A30,0xB018251,0x13275D08,0xA06E916,0x1C6D0096,0x39BA8ED,0x1F33D460,0x1F768501,0xB8E274F,0x12F85A72,0x37AD6};
	public static final int[] CURVE_Pxa={0x10C1F542,0x23AF907,0x159F840,0xBAC0E1F,0x133D7766,0x1C034C5D,0x14C5C875,0x1ED0BDA2,0x16A49C71,0x1E9FF62D,0x14F3ACC0,0x1E0C9FEA,0xC4638DE,0x74D18DA,0xBEA0030,0x5D962};
	public static final int[] CURVE_Pxb={0x749F03D,0xC843773,0xB17BCBA,0x1134AB4B,0x8EA016E,0x1A0D766C,0x58F819E,0x48A1FCC,0xE296F62,0x83370E4,0xC9BA1D5,0x1E43290E,0xEE59A80,0x1FDD85F5,0x1F3819B6,0x1D9F};
	public static final int[] CURVE_Pya={0x181A77F4,0x191AD22,0x1E9F842A,0x1E1E6CF6,0xD55B9D9,0x1D062533,0x15BB1323,0x7ECBC1,0x1A9EC2EF,0x1EE14CE0,0x1E96B271,0xA794439,0x1C544324,0xE6AD5DC,0x16429B0F,0x448E3};
	public static final int[] CURVE_Pyb={0x1E1FDBA2,0x1A09DB6C,0xF680D5B,0xFCC6122,0xC488E2A,0x1E489ECD,0x1005617E,0x1CF9EC36,0x1C89ED72,0x16C00D90,0x1563E595,0x1243DDC0,0x8698F9E,0x1BD81E7E,0xF2A0F4A,0x66A0};

// not used
	public static final int[][] CURVE_W={{},{}};
	public static final int[][][] CURVE_SB={{{},{}},{{},{}}};
	public static final int[][] CURVE_WB={{},{},{},{}};
	public static final int[][][] CURVE_BB={{{},{},{},{}},{{},{},{},{}},{{},{},{},{}},{{},{},{},{}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=false;
*/


// BNT Curve
/*
	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BN_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0x2,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0xD30210D,0x13ABBBF4,0xCB2CD8E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120};
	public static final int[] CURVE_Bnx={0x4081,0x40300,0x10,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0xB4FCD87,0xF5A9EAD,0xEAC47EB,0x19054BE5,0x104C9764,0x18A3B28A,0x12006,0x0,0x0};
	public static final int[] CURVE_Fra={0xDC80022,0xFAE8A75,0x1EB338D6,0x189209AD,0x13211BE6,0x4F8C850,0x10E53D94,0x12593778,0x1328A2};
	public static final int[] CURVE_Frb={0xECA6F1,0x53F5582,0x1E65F5D9,0x1C18A27B,0x1A3DEB01,0x10A2832B,0x1456AA9A,0x9136B67,0x10D87E};
	public static final int[] CURVE_Pxa={0x88E65BB,0x144C3F11,0xA98C4EF,0x18015A39,0x1548B7CC,0xA992820,0xE7AF301,0x19A09826,0x14483F};
	public static final int[] CURVE_Pxb={0x8DBE2C0,0x133C4440,0x78D214E,0xAFFC3F0,0x51B57B9,0x285318D,0xC0B68FF,0x166709D8,0x87F46};
	public static final int[] CURVE_Pya={0x20CA1D,0x101623F,0xE67CDB,0x19682CFD,0x19F72C94,0x14E372A1,0xF5D28B1,0x13820561,0x14E8C2};
	public static final int[] CURVE_Pyb={0x116628F2,0x1EC21BE3,0xF2DF71A,0x144FC2CF,0x172681D0,0xC54163A,0xF47B7B0,0x148C48A9,0x17AFE2};
	public static final int[] CURVE_Gx ={0xEB4A712,0x14EDDFF7,0x1D192EAF,0x14AAAC29,0xD5F06E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120};
	public static final int[] CURVE_Gy ={0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[][] CURVE_W={{0x1838403,0x1321803,0x106660E1,0x3024304,0x600,0x0,0x0,0x0,0x0},{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_SB={{{0x1840504,0x13A1E03,0x10666101,0x3024304,0x600,0x0,0x0,0x0,0x0},{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xBAC9D0A,0x1279A3F1,0x1C4C6CAD,0xEA62620,0xD5EFAE8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120}}};
	public static final int[][] CURVE_WB={{0x80C080,0xB0A0301,0x10222030,0x100C101,0x200,0x0,0x0,0x0,0x0},{0x88C4A85,0x15A9C820,0x14B71B0D,0x1D5A5F46,0x158868ED,0x106D21B1,0xC004,0x0,0x0},{0x4464583,0x1AD6E590,0xA5B8D8E,0x1EAD2FA3,0x1AC43476,0x83690D8,0x6002,0x0,0x0},{0x814181,0xB120901,0x10222050,0x100C101,0x200,0x0,0x0,0x0,0x0}};
	public static final int[][][] CURVE_BB={{{0xD2FE08D,0x13A7B8F4,0xCB2CD7E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120},{0xD2FE08C,0x13A7B8F4,0xCB2CD7E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120},{0xD2FE08C,0x13A7B8F4,0xCB2CD7E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120},{0x8102,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0xD2FE08C,0x13A7B8F4,0xCB2CD7E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120},{0xD2FE08D,0x13A7B8F4,0xCB2CD7E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120},{0xD2FE08C,0x13A7B8F4,0xCB2CD7E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120}},{{0x8102,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0},{0x8101,0x80600,0x20,0x0,0x0,0x0,0x0,0x0,0x0}},{{0x4082,0x40300,0x10,0x0,0x0,0x0,0x0,0x0,0x0},{0x10202,0x100C00,0x40,0x0,0x0,0x0,0x0,0x0,0x0},{0xD2FA00A,0x13A3B5F4,0xCB2CD6E,0x11A86925,0xD5F00E8,0x159B4B7C,0x53BE82E,0x1B6CA2E0,0x240120},{0x4082,0x40300,0x10,0x0,0x0,0x0,0x0,0x0,0x0}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=true;

*/

// BLS383 Curve

	public static final int CURVETYPE=WEIERSTRASS;
	public static final int CURVE_PAIRING_TYPE=BLS_CURVE;
	public static final int CURVE_A = 0;
	public static final int[] CURVE_B = {0x9,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cof = {0x52B,0x2A00,0xAAB2CA0,0x5560AAA,0x6055,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};

	public static final int[] CURVE_Order={0xFFF001,0xFFF8000,0xFE7800,0xBFDE007,0xC5EDF1C,0x3000049,0x910007A,0xC40007F,0x641004C,0x14,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Gx={0xD10786B,0xD59B348,0x3F54AD0,0x3477C0E,0x4578B9B,0xBF25B73,0x7BB6F65,0x4F6AC00,0xFF57E9C,0xEFD5830,0xFB6EC02,0xADB9F88,0xEE4BC98,0xB08C};
	public static final int[] CURVE_Gy={0xD145DDB,0x5DA023,0x5FEF7CC,0x13F518C,0x2B2A66F,0x56EC346,0xC7A925F,0x96F3019,0x981223E,0x9061047,0x8F5BE59,0x4810AD,0x9337671,0x1F390};

	public static final int[] CURVE_Bnx={0x40,0x100,0x110,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
	public static final int[] CURVE_Cru={0xDA155A9,0xA3AAC4E,0x61E5E3D,0xDF2FE87,0xE632625,0xBCDFAAD,0xD3035A6,0x5123128,0xBEAD683,0xDBF3A2B,0x424190,0x5C5FAB2,0x80A9F7,0x7AC52};
	public static final int[] CURVE_Fra={0x2B4508B,0x2BA59A9,0x6EEF343,0x63DB7A0,0x1DFBC74,0x40341CB,0x32D55D3,0x1639E9D,0x5CC36D4,0xB19B3F0,0xD86AB98,0xF323EE4,0xB198672,0x5A5F};
	public static final int[] CURVE_Frb={0x7F904E0,0x81051A9,0xF086A37,0xB7D49A6,0xB7DB8AB,0x8F3EEB8,0xC6C9543,0xEEF7983,0x49CB35D,0x7A65F65,0x7CBFBEC,0x693D177,0x5672384,0x751F2};
	public static final int[] CURVE_Pxa={0xBAC9472,0x6059885,0xE2DC36D,0x7C4D31D,0x8C88A7,0xBDC90C3,0x1C688FC,0x29F0197,0xC43F167,0x3693539,0x61EB8BF,0xD81E5A5,0x22B56BF,0x4D507};
	public static final int[] CURVE_Pxb={0x272AB23,0x9B4BD7A,0xF44DCE8,0x7AF19D4,0x3206A34,0x3F6F7B9,0x2A819FB,0x571DD3E,0x635D7EE,0x3A2BA3B,0xC1A126,0xAC28C78,0x17C3E5B,0xEE36};
	public static final int[] CURVE_Pya={0x77BD4FD,0x81D2309,0xDFDFC6,0xB66072,0xC89A0C,0x41FC959,0x878287A,0x2E1FBCF,0x14EEE65,0x11C230,0x6BB325E,0x2887881,0x859A05C,0x8F40};
	public static final int[] CURVE_Pyb={0x52C4CE6,0xA5E20A2,0xAFF40C8,0x5907A74,0x2448EF3,0x41760A4,0xFDA199,0xFFEF82B,0x8D4EA49,0xA0F29A1,0x6E4997B,0xAC7F7B8,0xBA88C12,0x1DCAB};

// not used
	public static final int[][] CURVE_W={{},{}};
	public static final int[][][] CURVE_SB={{{},{}},{{},{}}};
	public static final int[][] CURVE_WB={{},{},{},{}};
	public static final int[][][] CURVE_BB={{{},{},{},{}},{{},{},{},{}},{{},{},{},{}},{{},{},{},{}}};

	public static final boolean USE_GLV =true;
	public static final boolean USE_GS_G2 =true;
	public static final boolean USE_GS_GT =true;	
	public static final boolean GT_STRONG=false;


	public static boolean debug=false;
}
